import request from '@/utils/request';
import { Encrypt } from '@/utils/cryptoJS';

/**
 * 登录api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */
export function useLoginApi() {
	return {
		getCode: (params) => {
			return request({
				url: '/hcp-system/sysEntry/code',
				method: 'get',
				params: params,
				responseType: 'blob'
			});
		},
		signIn: (params) => {
			let value_Encrypt = Encrypt(JSON.stringify(params))
			return request({
				url: '/hcp-system/sysEntry/entry',
				method: 'post',
				data: { value: value_Encrypt },
			})
		},
	};
}
